# -*- coding: utf-8 -*-
'''
@author: Hugo
@file: text1.py
@time: 2021/9/15 20:40
'''
from icecream import ic
import pymysql
conn = pymysql.connect(host='127.0.0.1',user='root',password='123456',db='amazon',port=3306,charset='utf8')
print(conn)
cursor = conn.cursor()
ic(cursor.execute('select * from caty'))
sql = "insert into caty (name,url) values (%s,%s)"
print(cursor.execute(sql,('w','y')))
ic(cursor.execute("select * from caty"))
conn.commit()
cursor.close()
conn.close()